import request from '@/utils/request.js'

//添加班级
export const MainClassAddService = (mainClassData) => {
    return request.post('/mainClass', mainClassData)
}

//修改班级
export const MainClassUpdateService = (mainClassData) => {
    return request.put('/mainClass', mainClassData)
}

//删除班级
export const MainClassDeleteService = (id) => {
    return request.delete('/mainClass?id=' + id)
}


//搜索获取班级信息
export const MainClassListBySearchService = (input,select,currentPage,pageSize) =>{
    return request.get('/mainClass/search', {
        params: {
            input: input,
            select: select,
            page: currentPage,
            size: pageSize
        }
    })
}


export const MainClassListAllSerivce = () =>{
    return request.get('/mainClass/all')
}

export const fetchMainClasssByTeacher =(id) =>{
    return request.get('/mainClass/fetch?id='+id)
}

//搜索获取班级信息
export const MainClassListBySearchTeacherService = (input,teacherId,select,currentPage,pageSize) =>{
    return request.get('/mainClass/searchTeacher', {
        params: {
            input: input,
            teacherId:teacherId,
            select: select,
            page: currentPage,
            size: pageSize
        }
    })
}